Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Improve the documentation on ScalarValue #8378

Merged
merged 3 commits into from
Dec 2, 2023

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Nov 30, 2023

Which issue does this PR close?

Part of #7013

Rationale for this change

Creating null ScalarValues is confusing, and it came up internally in IOx, so I would like to improve the documentation to try and make this concept clearer

What changes are included in this PR?

  1. Update ScalarValue documentation and adds some examples

Are these changes tested?

Yes, doc tests

Are there any user-facing changes?

Better docs and examples

@alamb alamb added documentation Improvements or additions to documentation devrel labels Nov 30, 2023
@alamb alamb changed the title Minor: Improve the documentation on ScalarValue Docs: Improve the documentation on ScalarValue Nov 30, 2023
@alamb alamb marked this pull request as ready for review November 30, 2023 20:16
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Nov 30, 2023
@Dandandan Dandandan merged commit 3b29837 into apache:main Dec 2, 2023
22 checks passed
@Dandandan
Copy link
Contributor

Thanks for all these doc improvements @alamb

@alamb alamb deleted the alamb/document-nulls branch December 3, 2023 12:29
///
/// # Null Handling
///
/// `ScalarValue` represents null values in the same way as Arrow. Nulls are
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @jayzhan211 -- perhaps this can help explain some of how we can avoid using NullArray / ScalarValue::Null in the various list array functions

appletreeisyellow pushed a commit to appletreeisyellow/datafusion that referenced this pull request Dec 14, 2023
* Minor: Improve the documentation on `ScalarValue`

* Update datafusion/common/src/scalar.rs

Co-authored-by: Liang-Chi Hsieh <[email protected]>

* Update datafusion/common/src/scalar.rs

Co-authored-by: Liang-Chi Hsieh <[email protected]>

---------

Co-authored-by: Liang-Chi Hsieh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants